package com.shuwen.gcdj.common.enums;

import com.shuwen.gcdj.bean.Enum.LogModule.LogModuleResp;

import java.util.ArrayList;
import java.util.List;

/**
 * @author :杨云山
 * 系统日志 模块枚举
 * @date : 2023/3/15 13:09
 */
public enum LogModuleEnum {

    LOG_MODULE_USER(0,"用户模块"),
    LOG_MODULE_DICTIONARY(1,"字典模块"),
    LOG_MODULE_ROLE(2,"角色模块"),
    LOG_MODULE_POWER(3,"权限模块"),
    LOG_MODULE_API(4,"api模块"),
    LOG_MODULE_FILE(5,"文件模块"),
    LOG_MODULE_DEPT(6,"部门模块");

    private final String moduleName;

    private final Integer moduleNum;

    public String getModuleName() {
        return moduleName;
    }

    public Integer getModuleNum() {
        return moduleNum;
    }

    LogModuleEnum(Integer moduleNum, String moduleName) {
        this.moduleNum = moduleNum;
        this.moduleName = moduleName;
    }

    public static List<LogModuleResp> getList(){
        LogModuleEnum[] values = values();
        List<LogModuleResp> objects = new ArrayList<>();
        for (LogModuleEnum i : values){
            LogModuleResp logModuleResp = new LogModuleResp();
            logModuleResp.setModuleNum(i.getModuleNum());
            logModuleResp.setModuleName(i.getModuleName());
            objects.add(logModuleResp);
        }
        return objects;
    }

}
